package org.leaf.green.b2b

class Retailer {            //门店

    String serialNumber     //序号
    String name             //名称
    Department department   //部门
    Region region           //区域
    Boolean isActive        //启用

    static constraints = {
        serialNumber(nullable:false, blank: false, maxSize : 4, unique : true)
        name(nullable:false, blank:false, maxSize : 50)
        department(nullable:false)
        region(nullable:false)
        isActive(nullable:false)
    }

    String toString(){
        return "$serialNumber-$name"
    }

    static mapping = {
        table 'B2B_RETAILER'
    }

}
